﻿using System;

namespace Engine.Sgml.Allocation {
    /// <summary>
    /// Provides an iterator over a set of nodes.
    /// </summary>
    internal interface INodeIterator {
        /// <summary>
        /// Gets the current element in the set.
        /// </summary>
        SElement Current { get; }
        /// <summary>
        /// Advances the iterator to the next element of the set.
        /// </summary>
        /// <returns>true if the iterator was successfully advanced to the next element; false if the iterator has passed the end of the set.</returns>
        bool MoveNext();
        /// <summary>
        /// Advances the iterator to the previous element of the set.
        /// </summary>
        /// <returns>true if the iterator was successfully advanced to the previous element; false if the iterator has passed the begin of the set.</returns>
        bool MovePrevious();
        /// <summary>
        /// Sets the iterator to its initial position, which is before the first element in the set.
        /// </summary>
        /// <param name="element">A first element.</param>
        void Reset(SElement element);
        }
    }
